<?

$filename = $MAIN->template->path . "/footer.php";

if (file_exists($filename)) {
    require_once $filename;
} else {
    Logger::error("Footer of [" . $MAIN->template->code . "]template not found");
}/**/